package com.centit.framework.ip.businessdata.po;

import org.hibernate.validator.constraints.Length;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;


/**
 * create by scaffold 2018-05-22
 *
 * @author guo_jh
 * <p>
 * T_INTERFACE_MANAGER业务系统接口配置信息表
 */
@Entity
@Table(name = "T_INTERFACE_MANAGER")
public class InterfaceManager implements java.io.Serializable {
    private static final long serialVersionUID = 1L;


    /**
     * RECORDID 主键
     */
    @Id
    @Column(name = "RECORDID")

    private String recordid;

    /**
     * SYSTEMFLAG 子系统标识
     */
    @Column(name = "SYSTEMFLAG")
    @Length(min = 0, max = 32, message = "字段长度不能小于{min}大于{max}")
    private String systemflag;
    /**
     * SYSTEMURL 子系统地址
     */
    @Column(name = "SYSTEMURL")
    @Length(min = 0, max = 400, message = "字段长度不能小于{min}大于{max}")
    private String systemurl;
    /**
     * SYSTEMNAME 子系统名称
     */
    @Column(name = "SYSTEMNAME")
    @Length(min = 0, max = 400, message = "字段长度不能小于{min}大于{max}")
    private String systemname;
    /**
     * START_OR_STOP 启用/禁用(T/F)
     */
    @Column(name = "START_OR_STOP")
    @Length(min = 0, max = 2, message = "字段长度不能小于{min}大于{max}")
    private String startOrStop;
    /**
     * CREATER null
     */
    @Column(name = "CREATER")
    @Length(min = 0, max = 32, message = "字段长度不能小于{min}大于{max}")
    private String creater;
    /**
     * CREATE_TIME null
     */
    @Column(name = "CREATE_TIME")
    private Date createTime;
    /**
     * UPDATER null
     */
    @Column(name = "UPDATER")
    @Length(min = 0, max = 32, message = "字段长度不能小于{min}大于{max}")
    private String updater;
    /**
     * UPDATE_TIME null
     */
    @Column(name = "UPDATE_TIME")
    private Date updateTime;

    // Constructors

    /**
     * default constructor
     */
    public InterfaceManager() {
    }

    /**
     * minimal constructor
     */
    public InterfaceManager(
            String recordid
    ) {


        this.recordid = recordid;

    }

    /**
     * full constructor
     */
    public InterfaceManager(
            String recordid
            , String systemflag, String systemurl, String systemname, String startOrStop, String creater, Date createTime, String updater, Date updateTime) {


        this.recordid = recordid;

        this.systemflag = systemflag;
        this.systemurl = systemurl;
        this.systemname = systemname;
        this.startOrStop = startOrStop;
        this.creater = creater;
        this.createTime = createTime;
        this.updater = updater;
        this.updateTime = updateTime;
    }


    public String getRecordid() {
        return this.recordid;
    }

    public void setRecordid(String recordid) {
        this.recordid = recordid;
    }
    // Property accessors

    public String getSystemflag() {
        return this.systemflag;
    }

    public void setSystemflag(String systemflag) {
        this.systemflag = systemflag;
    }

    public String getSystemurl() {
        return this.systemurl;
    }

    public void setSystemurl(String systemurl) {
        this.systemurl = systemurl;
    }

    public String getSystemname() {
        return this.systemname;
    }

    public void setSystemname(String systemname) {
        this.systemname = systemname;
    }

    public String getStartOrStop() {
        return this.startOrStop;
    }

    public void setStartOrStop(String startOrStop) {
        this.startOrStop = startOrStop;
    }

    public String getCreater() {
        return this.creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdater() {
        return this.updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }

    public Date getUpdateTime() {
        return this.updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }


    public InterfaceManager copy(InterfaceManager other) {

        this.setRecordid(other.getRecordid());

        this.systemflag = other.getSystemflag();
        this.systemurl = other.getSystemurl();
        this.systemname = other.getSystemname();
        this.startOrStop = other.getStartOrStop();
        this.creater = other.getCreater();
        this.createTime = other.getCreateTime();
        this.updater = other.getUpdater();
        this.updateTime = other.getUpdateTime();

        return this;
    }

    public InterfaceManager copyNotNullProperty(InterfaceManager other) {

        if (other.getRecordid() != null) {
            this.setRecordid(other.getRecordid());
        }

        if (other.getSystemflag() != null) {
            this.systemflag = other.getSystemflag();
        }
        if (other.getSystemurl() != null) {
            this.systemurl = other.getSystemurl();
        }
        if (other.getSystemname() != null) {
            this.systemname = other.getSystemname();
        }
        if (other.getStartOrStop() != null) {
            this.startOrStop = other.getStartOrStop();
        }
        if (other.getCreater() != null) {
            this.creater = other.getCreater();
        }
        if (other.getCreateTime() != null) {
            this.createTime = other.getCreateTime();
        }
        if (other.getUpdater() != null) {
            this.updater = other.getUpdater();
        }
        if (other.getUpdateTime() != null) {
            this.updateTime = other.getUpdateTime();
        }

        return this;
    }

    public InterfaceManager clearProperties() {

        this.systemflag = null;
        this.systemurl = null;
        this.systemname = null;
        this.startOrStop = null;
        this.creater = null;
        this.createTime = null;
        this.updater = null;
        this.updateTime = null;

        return this;
    }
}
